package health_system.health_system.dto;

import health_system.health_system.entity.ChatMessage;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class ChatMessageDTO {
    
    private Long id;
    private Long chatRoomId;
    private String chatRoomName;
    private Long senderId;
    private String senderName;
    private String senderAvatar;
    private ChatMessage.MessageType messageType;
    private String textContent;
    private String mediaUrl;
    private Integer mediaDuration;
    private Long replyToMessageId;
    private String replyToMessagePreview;
    private Boolean isDeliveredToServer;
    private LocalDateTime deliveredAt;
    private Boolean isRecalled;
    private LocalDateTime recalledAt;
    private Boolean isPinned;
    private LocalDateTime pinnedAt;
    private List<MessageReadStatusDTO> readStatuses;
    private Long readCount;
    private Boolean isReadByCurrentUser;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    /**
     * 消息阅读状态DTO
     */
    @Data
    public static class MessageReadStatusDTO {
        private Long userId;
        private String username;
        private Boolean isRead;
        private LocalDateTime readAt;
    }
} 